// 导入自己封装的已经连接的mongoose
const mongoose = require('./connect')

// 商品表的schema
const roleSchema = new mongoose.Schema({
    name: {
        required: true,
        type: String
    },
    auths: {
        required: true,
        type: Array
    }
})

const roleModel = mongoose.model('role', roleSchema, 'role')


// 导出model
module.exports = roleModel